package scraper;  
 
import org.webharvest.runtime.ScraperContext;  
import org.webharvest.runtime.variables.Variable;  
    
  public class Test extends ScraperTest  
  {  
      public static void main(String[] args)  
      {  
          try  
          {  
        	  Test scraper = new Test();  
              // do the scraping  
              scraper.scrapeUrlList("config/se.urls.xml", "config/se.page.xml");  
          }  
          catch (Exception e)  
          {  
              e.printStackTrace();  
          }  
      }  
    
      /** 
       * @see scrape.QuickScraper pageScraped(java.lang.String, org.webharvest.runtime.ScraperContext) 
       */  
      public void pageScraped(String url, ScraperContext context)  
      {  
          Variable nameVar = context.getVar("name");  
          if (nameVar==null)  
          {  
              LOG.warn("Scrape for "+url+" produced no data! Ignoring");  
              return;  
          }  
    
          // store this station's details  
          LOG.info(url+" has "+context.getVar("screen.width").toString()+"x"+context.getVar("screen.height").toString()+" screen");  
      }  
  }